package com.will.service;



import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
//@Path("/comm")
public class CommonService {

    private final Logger logger = LoggerFactory.getLogger(CommonService.class);

//    @GET
//    @Path("processreq")
//    public ResultDataDTO processReq(String requeststr) {
//        long starttime = System.currentTimeMillis();
//        logger.debug("接收请求，报文：" + requeststr);
//        ResultDataDTO result = new ResultDataDTO(Constant.ReturnCode.CODE_200, "调用成功");
//        String restr = null;
//        try {
////            restr = socketConnectorManager.send(requeststr);
//            LoginMsg loginMsg = new LoginMsg();
//            loginMsg.setPassword("yao");
//            loginMsg.setUserName("robin");
//            String s = JSON.toJSONString(loginMsg);
//            BaseData baseData = BaseData.builder()
//                    .clientId("app")
//                    .type(MsgType.LOGIN)
//                    .jsonStr(s)
//                    .build();
//            String jsonString = JSON.toJSONString(baseData);
//            result.setData(restr);
//        } catch (Exception e) {
//            logger.error("", e);
//            result.setReCode(Constant.ReturnCode.CODE_500);
//            result.setRemark(e.getMessage());
//        }
//
////        logger.debug("返回请求，报文：" + JsonUtil.toJson(result) + " 用时:" + (System.currentTimeMillis() - starttime) + " ms");
//        return result;
//    }
}
